import { createApp } from 'vue'
import App from './App.vue'
import '@/permission'


import ElementPlus from 'element-plus'
// 导入本地语言包
import  zhCn  from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import './styles/index.scss'

import { createPinia } from 'pinia'
import router from './router'
import { myColor } from './directive/color'
import { auth } from './directive/auth'

const app = createApp(App)
// 注册自定义指令  v-my-color="pink"
app.directive('my-color',myColor)
app.directive('auth',auth)

app.use(ElementPlus,{
  // 设置语言包
  locale: zhCn,
})
app.use(ElementPlus)

app.use(createPinia())
app.use(router)

app.mount('#app')